home *** CD-ROM | disk | FTP | other *** search
- Path: red-branch.MIT.EDU!not-for-mail
- From: rid@red-branch.MIT.EDU (Shawna or Lars Hansen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Timing stuff
- Date: 5 Apr 1996 02:09:40 GMT
- Organization: Massachvsetts Institvte of Technology
- Message-ID: <4k1vd4$hbc@senator-bedfellow.MIT.EDU>
- References: <9604012043.AA003vp@ozzy.demon.co.uk> <4jsinv$9mi@senator-bedfellow.MIT.EDU> <9604031318.AA003wm@ozzy.demon.co.uk>
- NNTP-Posting-Host: red-branch.mit.edu
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Brian Skreeg (oz@ozzy.demon.co.uk) wrote on Wed, 3 Apr 96 13:18:07 GMT:
- : While smelling of fish Shawna or Lars Hansen (rid@red-branch.MIT.EDU) wrote:
- :
- : : timer.device
- :
- : Thought as much, but could you possibly elaborate a little. I looked at the
- : autodocs for it but couldn't make head nor tail of how it works.
- : __ _ _
- : / \ \ \
- : / / / / / |-Brian Skreeg--------------IRC:_Ozzy-|
- : \__/ \ \ |-Lead guitarist---Widdles on request-|
- : \__/_/ |-A fish or two is with no compromise-|
- Ah, well, I don't have my Amiga up and running at the moment, but I think
- I can give you a few pointers...
-
- Check out the include-file for the timer.device (should be device/timer.h
- or something like that. That'll give you the necessary commands you need
- to send to the device to set it up. It might also contain a specialized
- IOstruct (can't remember exactly). Then, check your autodocs for usage on
- OpenDevice, SendIO and AbortIO. You'll need the OpenDevice() command to
- get a connection to the device, and the SendIO to set it up. The
- timer.device will give you a signal as soon as the requested time is up.
- At this time, you will have to send another request for a new 'delay'
- before the next signal.
-
- I assume that you will have some sort of loop in your program, so all you
- have to do, is to check for the signal from the device.. If you set it at
- 10 seconds, you'll get a signal ten seconds later...Neat, huh? :)
-
- Additional help can be obtained from viewing code which uses this device.
- Perfmeter is a good example. It uses two timers, so keep your eyes open...
- Also, the ACE manual has a fairly good explanation of the use of the
- timer.device. Personally, I peeked at Perfmeter (check the Aminet site at
- a site near you...), and found it invalueable.
-
- Or, you could wait until I get my amiga hooked up to the net, and get my
- DateDiary program w/source to see how I used two timers ... But don't
- hold your breath.......
-
- --
- * Lars M. Hansen
-